package co.fitstart.admin.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dynamic;
import com.demo2do.core.persistence.annotation.Limit;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.courseware.movement.Movement;

/**
 * 
 * @author Wy
 *
 */
@Dynamic("hibernate")
public interface MovementDao {
    
    /**
     * 
     * @param beginIndex
     * @param maxResult
     * @return
     */
    @Limit
    @Query("FROM Movement WHERE disabled = false")
    public List<Movement> list(@Variable("beginIndex") int beginIndex, @Variable("maxResult") int maxResult);
    
    
    @Query("FROM Movement WHERE disabled = false AND Id = :movementID")
    public Movement load(@Variable("movementID") Long movementID);
}
